//所有路由信息 
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)


//使用懒加载

const Login = () =>
    import ('@/page/Login')
const Main = () =>
    import ('@/page/Main')
    //crm 模块
const CRMRemain = () =>
    import ('@/page/Crm/Remain')
const CRMOrganization = () =>
    import ('@/page/Crm/Organization')
const CRMCustom = () =>
    import ('@/page/Crm/Custom')
const CRMAllocation = () =>
    import ('@/page/Crm/Allocation')
    //销售模块
const unSubmint = () =>
    import ('@/page/Sell/unSubmint')
const SellAdd = () =>
    import ('@/page/Sell/add')
const Sellcheck = () =>
    import ('@/page/Sell/check')
const Sellchange = () =>
    import ('@/page/Sell/change')
const Selluploade = () =>
    import ('@/page/Sell/uploade')
const SellPay = () =>
    import ('@/page/Sell/pay')
const SellFinance = () =>
    import ('@/page/Sell/finance')
const SellDocument = () =>
    import ('@/page/Sell/document')

//退保模块
const BackAsk = () =>
    import ('@/page/Back/ask')
const BackCheck = () =>
    import ('@/page/Back/check')
const BackChange = () =>
    import ('@/page/Back/change')
const BackEnsure = () =>
    import ('@/page/Back/ensure')
const BackResult = () =>
    import ('@/page/Back/result')
    //财务模块
const ClearingCompany = () =>
    import ('@/page/Clearing/Company')
const ClearingOrganization = () =>
    import ('@/page/Clearing/Organization')
    //系统管理模块
const SystemSchool = () =>
    import ('@/page/System/School')
const SystemHospital = () =>
    import ('@/page/System/Hospital')
const SystemUserManage = () =>
    import ('@/page/System/User')
const SystemProduce = () =>
    import ('@/page/System/Produce')
    //报案

export default new Router({
    routes: [{
        path: '/',
        name: 'Login',
        component: Login
    }, {
        path: '/Main',
        name: 'Main',
        component: Main,
        children: [{
                //沟通提醒
                path: 'CRMRemain',
                name: 'CRMRemain',
                component: CRMRemain
            }, {
                //渠道管理
                path: 'CRMOrganization',
                name: 'CRMOrganization',
                component: CRMOrganization
            },
            {
                //客户管理
                path: 'CRMCustom',
                name: 'CRMCustom',
                component: CRMCustom
            },
            {
                //渠道 客户分配
                path: 'CRMAllocation',
                name: 'CRMAllocation',
                component: CRMAllocation
            },
            {
                //学校管理
                path: 'SystemSchool',
                name: 'SystemSchool',
                component: SystemSchool

            },
            {
                //学校管理
                path: 'SystemHospital',
                name: 'SystemHospital',
                component: SystemHospital

            },
            { //用户管理
                path: 'SystemUserManage',
                name: 'SystemUserManage',
                component: SystemUserManage
            },
            {
                path: 'SystemProduce',
                name: 'SystemProduce',
                component: SystemProduce
            },
            {
                //未提交
                path: 'unSubmint',
                name: 'unSubmint',
                component: unSubmint
            },
            {
                //购买
                path: 'SellAdd',
                name: 'SellAdd',
                component: SellAdd,
                meta: {
                    keepAlive: true // 不需要缓存
                }
            },
            {
                //审核
                path: 'Sellcheck',
                name: 'SellCheck',
                component: Sellcheck

            }, {
                //修改
                path: 'Sellchange',
                name: 'Sellchange',
                component: Sellchange
            },
            {
                //保险单上传下载
                path: 'Selluploade',
                name: 'Selluploade',
                component: Selluploade
            },
            {
                //缴费确认
                path: 'SellPay',
                name: 'SellPay',
                component: SellPay
            },
            {
                // 财务确认
                path: 'SellFinance',
                name: 'SellFinance',
                component: SellFinance
            },
            {
                //保险单上传
                path: 'SellDocument',
                name: 'SellDocument',
                component: SellDocument
            },
            // 退保 
            {
                //退保申请
                path: 'BackAsk',
                name: 'BackAsk',
                component: BackAsk

            },
            {
                //退保审核
                path: 'BackCheck',
                name: 'BackCheck',
                component: BackCheck
            },
            {
                //退保修改
                path: 'BackChange',
                name: 'BackChange',
                component: BackChange
            },
            {
                //退保修改
                path: 'BackEnsure',
                name: 'BackEnsure',
                component: BackEnsure
            },
            {
                //退保結果
                path: 'BackResult',
                name: 'BackResult',
                component: BackResult
            },
            //财务管理
            {
                //保险公司
                path: 'ClearingCompany',
                name: 'ClearingCompany',
                component: ClearingCompany

            },
            { //机构
                path: 'ClearingOrganization',
                name: 'ClearingOrganization',
                component: ClearingOrganization
            },
            //
            {
                // 报案
                path: 'ReportAdd',
                name: 'ReportAdd',
                component: () =>
                    import ('@/page/Report/add')
            },
            {
                path: 'addform',
                name: 'addform',
                component: () =>
                    import ('@/page/Report/addform')
            },
            {
                // 报案
                path: 'reportform',
                name: 'reportform',
                component: () =>
                    import ('@/page/Report/reportform')
            },
            { //审核页面
                path: 'ReportCheck',
                name: 'ReportCheck',
                component: () =>
                    import ('@/page/Report/check')
            },
            { //审核页面
                path: 'checkform',
                name: 'checkform',
                component: () =>
                    import ('@/page/Report/checkform')
            },
            { //追加报案
                path: 'ReportChange',
                name: 'ReportChange',
                component: () =>
                    import ('@/page/Report/task')
            },
            { //修改
                path: 'ReportChange',
                name: 'ReportChange',
                component: () =>
                    import ('@/page/Report/task')
            },
            { //修改
                path: 'taskform',
                name: 'taskform',
                component: () =>
                    import ('@/page/Report/taskform')
            },
            //查询页面
            {
                path: 'search',
                name: 'search',
                component: () =>
                    import ('@/page/Search/search')
            },







            { //添加账单
                path: 'lipeiadd',
                name: 'lipeiadd',
                component: () =>
                    import ('@/page/lipei/lipeiadd')
            },
            {
                //账单form 
                path: 'lipeiaddForm',
                name: 'lipeiaddForm',
                component: () =>
                    import ('@/page/lipei/lipeiaddForm')
            },

            {
                //理赔 lipeicheck
                path: 'lipeicheck',
                name: 'lipeicheck',
                component: () =>
                    import ('@/page/lipei/lipeicheck')
            },
            {
                path: 'lipeicheckForm',
                name: 'lipeicheckForm',
                component: () =>
                    import ('@/page/lipei/lipeicheckForm')

            },
            //医师审核
            {
                path: 'yishicheck',
                name: 'yishicheck',
                component: () =>
                    import ('@/page/lipei/yishicheck')
            },
            {
                //yishicheckform
                path: 'yishicheckForm',
                name: 'yishicheckForm',
                component: () =>
                    import ('@/page/lipei/yishicheckForm')
            },
            //待办任务
            {
                //
                path: 'lipeitask',
                name: 'lipeitask',
                component: () =>
                    import ('@/page/lipei/lipeitask')
            },
            {
                //
                path: 'lipeitaskform',
                name: 'lipeitaskform',
                component: () =>
                    import ('@/page/lipei/lipeitaskform')
            },
            {
                //
                path: 'lipeitaskResultMedical',
                name: 'lipeitaskResultMedical',
                component: () =>
                    import ('@/page/lipei/lipeitaskResultMedical')
            },

            //理赔计算
            {
                path: 'jisuan',
                name: 'jisuan',
                component: () =>
                    import ('@/page/lipei/jisuan')
            },
            {
                path: 'jisuanResult',
                name: 'jisuanResult',
                component: () =>
                    import ('@/page/lipei/jisuanResult')
            },
            {
                path: 'jisuanResultForm',
                name: 'jisuanResultForm',
                component: () =>
                    import ('@/page/lipei/jisuanResultForm')
            },

            //折扣计算
            {
                path: 'zhekoujisuan',
                name: 'zhekoujisuan',
                component: () =>
                    import ('@/page/lipei/zhekoujisuan')
            },
            {
                path: 'zhekoujisuanform',
                name: 'zhekoujisuanform',
                component: () =>
                    import ('@/page/lipei/zhekoujisuanform')
            },
            //折扣结果
            {
                path: 'zhekouResult',
                name: 'zhekouResult',
                component: () =>
                    import ('@/page/lipei/zhekouResult')
            },
            //支付确认
            {
                path: 'zhifuqueren',
                name: 'zhifuqueren',
                component: () =>
                    import ('@/page/lipei/zhifuqueren')
            },
            {
                path: 'zhifuqurenForm',
                name: 'zhifuqurenForm',
                component: () =>
                    import ('@/page/lipei/zhifuqurenForm')

            },
            //支付确认
            {
                path: 'lipeiResult',
                name: 'lipeiResult',
                component: () =>
                    import ('@/page/lipei/lipeiResult')
            },
            {
                path: 'lipeiResultForm',
                name: 'lipeiResultForm',
                component: () =>
                    import ('@/page/lipei/lipeiResultForm')
            },

            //支付确认医疗
            {
                path: 'jisuanResultMedical',
                name: 'jisuanResultMedical',
                component: () =>
                    import ('@/page/lipei/jisuanResultMedical')
            }
        ]
    }]
})